package net.dodoman.exception;

public class MyExceptionTest {
	static void makeException(int a) throws MyException1, MyException2 {
		if (a < 10)
			throw new MyException1(a);
		if (a > 100)
			throw new MyException2(a);
		System.out.println("No Exception");
	}

	public static void main(String[] args) {
		int a;
		try {
			a = Integer.parseInt(args[0]);
			makeException(a);
			System.out.println("a=" + a);
		} catch (MyException1 e) {
			System.out.println("" + e);
		} catch (MyException2 e) {
			System.out.println("" + e);
		}
		try {
			if (true)
				throw new MyException3("abc", "123");
		} catch (MyException3 e) {
			System.out.println(e.id);
			System.out.println(e.text);
		}
	}
}